import 'package:dmz/base/widget/load_state_widget.dart';
import 'package:dmz/business/home/controller/run_message_controller.dart';
import 'package:dmz/business/home/widgets/run_message_widgets.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class RunMessageCountWidget extends StatelessWidget {
  const RunMessageCountWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return GetBuilder<RunMessageController>(
        id: 'count',
        builder: (controller) {
          return controller.pageModel == null
              ? createEmptyWidget(controller)
              : Column(children: [
                  RunMessageWidgets.conuntTopWidget(controller.pageModel!),
                  RunMessageWidgets.conuntMidleWidget(controller.pageModel!),
                  RunMessageWidgets.runMessageStatisticsTable(
                      controller.pageModel!, controller.scrollController)
                ]);
        });
  }
}
